package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by LN on 2017/8/23.17:50
 */
@DynamicInsert
@Entity
@Table(name = "salesman_incomingdetail_log")
public class SalesmanIncomingdetailLogEntity extends BaseEntity{
    private String l2RNo;
    private Date arrDate;
    private String salesmanMemberOpenid;

    @Basic
    @Column(name = "l2r_no")
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "arrDate")
    public Date getArrDate() {
        return arrDate;
    }

    public void setArrDate(Date arrDate) {
        this.arrDate = arrDate;
    }

    @Basic
    @Column(name = "salesman_member_openid")
    public String getSalesmanMemberOpenid() {
        return salesmanMemberOpenid;
    }

    public void setSalesmanMemberOpenid(String salesmanMemberOpenid) {
        this.salesmanMemberOpenid = salesmanMemberOpenid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SalesmanIncomingdetailLogEntity that = (SalesmanIncomingdetailLogEntity) o;

        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (arrDate != null ? !arrDate.equals(that.arrDate) : that.arrDate != null) return false;
        if (salesmanMemberOpenid != null ? !salesmanMemberOpenid.equals(that.salesmanMemberOpenid) : that.salesmanMemberOpenid != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 0;
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (arrDate != null ? arrDate.hashCode() : 0);
        result = 31 * result + (salesmanMemberOpenid != null ? salesmanMemberOpenid.hashCode() : 0);
        return result;
    }
}
